package com.ruoyi.process.pipemaintainence.listener;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.springframework.stereotype.Component;


@Component
public class PipeDepartmentPersonTaskListener implements TaskListener {

    //管养单位组织id   设置为1
    public static final String PIPE_DEPARTMENT_ID_ = "8";

    @Override
    public void notify(DelegateTask delegateTask) {
    //    IUserService userService = AppUtil.getBean(UserServiceImpl.class);
        //根据部门id查询该部门人员
    //    List<SysUser> userList = userService.findUserByDeptId(PIPE_DEPARTMENT_ID_);
        //也可以设置变量,需要在设定办理人的时候使用ul表达式  ${assigne}
        // delegateTask.setVariable("assigne", "3");
//        if (CollUtil.isNotEmpty(userList)) {
//            for (SysUser sysUser : userList) {
//                delegateTask.addCandidateUser(sysUser.getUserId().toString());
//            }
//        }
    }


}
